package com.bdqn.t330.ch12.service;

import com.bdqn.t330.ch12.dao.CityMapper;
import com.bdqn.t330.ch12.dao.ProvinceMapper;
import com.bdqn.t330.ch12.entity.City;
import com.bdqn.t330.ch12.entity.Province;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ProvinceServiceImp implements ProvinceService {

    @Resource
    ProvinceMapper provinceMapper;

    @Resource
    CityMapper cityMapper;

    @Override
    public List<Province> getListService() {
        return provinceMapper.list();
    }

    public List<City> findByIdService(int id) {
        return cityMapper.findById(id);
    }
}
